/*************************************************************************
	> File Name: main.cc
	> Author: Joker
	> Mail: mahongtao@foxmail.com 
	> Created Time: 2020-09-22 23:08:41
 ************************************************************************/

#include "Iterator.h"

#include <iostream>
using namespace std;
 
void test0(){
    Aggregate * pAggregate = new ConcreateAggregate(7);
    Iterator * pIterator = new ConcreateIterator(pAggregate);

    for(; pIterator->IsDone() == false; pIterator->Next()){
        cout << pIterator->CurrentItem() << endl;
    }

    delete pAggregate;
}

int main(int argc,char *argv[])
{
    test0();
    return 0;
}
